package neo.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.java1234.model.PageBean;

import neo.dao.DeviceDao;
import neo.model.Device;
import neo.util.Keyword;

@Service("deviceService")
public class DeviceService {

	@Resource
	private DeviceDao deviceDao;
	
	public void add(Device device) {
		deviceDao.add(device);
	}
	
	public void update(Device device) {
		deviceDao.update(device);
	}
	
	public List<Device> find(PageBean pageBean, Keyword keyword){
		return deviceDao.find(pageBean, keyword);
	}
	
	public int count(){
		return deviceDao.count();
	}
	
	public Device loadById(Integer id){
		return deviceDao.loadById(id);
	}
	
	public void delete(Integer id){
		deviceDao.delete(id);
	}

}
